package com.lb.shopguide.util.lb;


import com.lb.shopguide.base.BaseFragment;
import com.lb.shopguide.ui.dialog.DialogSelectPic;

/**
 * Created by kang on 2017/4/25.
 */

public class SelectPicUtil {
    /**
     * 显示选择图片
     */
    public static DialogSelectPic showDialogSelectPic(String title, DialogSelectPic.OnSelectPhotoListener listener, BaseFragment fragment, boolean ifCrop) {
        DialogSelectPic mDialogSelectPic = DialogSelectPic.getDialogSelectPic(title, ifCrop);
        mDialogSelectPic.setOnSelectPhotoListener(listener);
        mDialogSelectPic.show(fragment.getFragmentManager(), "mDialogSelectPic");
        return mDialogSelectPic;
    }

    public static DialogSelectPic showDialogSelectPic(String title, DialogSelectPic.OnSelectPhotoListener listener, BaseFragment fragment) {
        DialogSelectPic mDialogSelectPic = DialogSelectPic.getDialogSelectPic(title);
        mDialogSelectPic.setOnSelectPhotoListener(listener);
        mDialogSelectPic.show(fragment.getFragmentManager(), "mDialogSelectPic");
        return mDialogSelectPic;
    }
}
